package com.Ling.Thread.procuctorAndCustomer;

/**
 * File Name: Customer
 * Date: 2020-06-28 11:06
 * Author: liangling
 * Description
 */
public class Customer extends Thread{

    private prosuctPool prosuctPool;

    public Customer(prosuctPool pool){
        this.prosuctPool = pool;
    }


    @Override
    public void run() {
        while (true){
            product product = this.prosuctPool.pop();
            System.out.println("消费者消费了一件产品"+product.getName());

        }
    }
}
